#pragma once

#include <QtXml>
#include <QList>

#include "src/QMuscleWindow/QNode.h"
#include "src/QMuscleWindow/QAbstractMuscle.h"
#include "src/QMuscleWindow/QSpongeMuscle.h"
#include "src/QMuscleWindow/QPotentialMuscle.h"

#include "src/QMuscleWindow/ConnectionStruct.h"

#include "src/QNeuronWindow/QNerveTissue.h"
#include "src/QNeuronWindow/QNeuron.h"
#include "src/QNeuronWindow/QReceptor.h"
#include "src/QNeuronWindow/QTransmitter.h"

#include "src/QNeuronWindow/QElectricSynapse.h"
#include "src/QNeuronWindow/QInhibitorSynapse.h"
#include "src/QNeuronWindow/QChemicalSynapse.h"

class QXmlModelHandler: public QXmlDefaultHandler
{
private:
    double xMin, xMax, yMin, yMax;
    QList <QNode*> nList;
    QList <QAbstractMuscle*> mList;
    QList <QNerveTissue*> nerveList;
    QList <CONNECTION> connectionList;

public:
    QXmlModelHandler(void);
    bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
    QList <QNode*> getNList(void);
    QList <QAbstractMuscle*> getMList(void);
    QList <QNerveTissue*> getNerveList(void);
    QList <CONNECTION> getConnectionList(void);
    double getXSize(void);
    double getYSize(void);
};
